data<-read.table("final_r2_values", sep="\t")
cal<-data[,2]
beag<-data[,3]
cor<- cor(cal,beag,method="pearson")
cor<-round(cor, digits = 3)
main<-"Scatter plot Calculated vs Beagle r square"
pas<- paste(main,cor,sep=" ")
pdf("scatterplot.pdf")
plot(cal, beag, main=pas,xlab="Calculated r square", ylab="Beagle r square",pch=".")
abline(lm(beag~cal), col="red")
dev.off()
